<!--
 * @Description:
 * @Author BPF
 * @create 2021/10/6 14:02
 -->
<template>
  <div
    v-water-marker="{ text: defaultSetting.application.name, textColor: 'rgba(180, 180, 180, 0.6)' }"
    class="page flex flex-col justify-center items-center w-full h-full"
  >
    <div class="login-wrap bg-white shadow-xm p-30 rounded h-full">
      <login :dialog="false" @login-success="onLoginSuccess"></login>
    </div>
  </div>
</template>

<script>
import Login from './components/Login'
import defaultSetting from '@/setting'
export default {
  name: 'FrontLogin',
  components: {
    Login
  },
  data() {
    return {
      defaultSetting
    }
  },
  methods: {
    onLoginSuccess() {
      const url = this.$route.query?.redirect || '/backsys/home'
      this.$router.replace(url)
    }
  }
}
</script>

<style scoped lang="scss">
.page {
  ::v-deep .login-wrap {
    width: 550px;
    //margin-right: 10%;
    .el-icon-close {
      display: none;
    }
  }
}
</style>
